/*
 * Filename : TreeRefresh.java
 * Description : **COMPLETE**
 * History  : Date               Engineer       Description
 *            ---------          ------------   --------------------------------
 *            September 10, 2007      waitek         Initial creation.
 */

package com.lct.eq2.data;

import com.lct.eq2.gui.LiteGui;

public class TreeRefresh extends Thread implements Runnable {
    private LiteGui parent = null;
    private boolean running = false;
    
    /** Creates a new instance of TreeRefresh */
    public TreeRefresh(LiteGui parent) {
        this.parent = parent;
    }
    
    public void stopRunning() {
        this.running = false;
    }
    
    public void run() {
        this.running = true;
        try {
            while (this.running) {
                this.parent.updateTree(this.parent.jTree1);
                this.sleep(1000);
            }
        } catch (InterruptedException ex) {
            ex.printStackTrace();
        }
    }
}
